function passCheck() {
	
	var oldpass = userInput = document.getElementById("admin_oldpass");
	var newPass = userInput = document.getElementById("admin_newpass");
	var newPass_confirm = userInput = document.getElementById("admin_newpassComfirm");
	var messageError = document.getElementById("change_error");
	
	messageError.style.display = 'none';
	
	if(oldpass.value == "") {
		messageError.style.display = 'block';
		messageError.innerHTML = "<center><b>ผิดพลาด : </b>คุณยังไม่ได้ป้อนรหัสผ่านเก่า";
		oldpass.focus();
	} else if(newPass.value == "") {
		messageError.style.display = 'block';
		messageError.innerHTML = "<center><b>ผิดพลาด : </b>คุณยังไม่ได้ป้อนรหัสผ่านใหม่";
		newPass.focus();
	} else if(newPass_confirm.value == "") {
		messageError.style.display = 'block';
		messageError.innerHTML = "<center><b>ผิดพลาด : </b>คุณยังไม่ได้ป้อนยืนยันรหัสผ่านใหม่";
		newPass_confirm.focus();
	} else if(newPass.value != newPass_confirm.value) {
		messageError.style.display = 'block';
		messageError.innerHTML = "<center><b>ผิดพลาด : </b>รหัสผ่านใหม่ของคุณไม่ตรงกัน";
		newPass.value = "";
		newPass_confirm.value = "";
		newPass.focus();
	} else {
		changePasswordProcess(oldpass.value,newPass.value);
	}
}

function changePasswordProcess(oldpass,newPass) {
	var URL = "changepassword_process.php";
	var data = "oldpass=" + oldpass + "&newPass=" + newPass;
	ajaxLoad('post', URL, data, 'change_error');
}